project "RayTracing-weekend"
    kind "ConsoleApp"
    language "C++"
    cppdialect "C++17"

    place2root = "../"
    targetdir (place2root .. "bin/" .. outputdir .. "/%{prj.name}")
    objdir (place2root .. "bin-int/" .. outputdir .. "/%{prj.name}")

    files 
    {
        "src/**.h", 
        "src/**.cc",
        "src/**.cpp",
    }

    includedirs
    {
        "src",

    }

    postbuildcommands
    {
        'powershell -Command "[System.IO.File]::WriteAllText(\'image.ppm\', (& { & \'' ..
        place2root .. 'bin/' .. outputdir .. '/%{prj.name}/%{prj.name}.exe\' }), (New-Object -TypeName System.Text.UTF8Encoding -ArgumentList $false))"'
    }

    


    filter { "configurations:debug", "system:windows" }
        symbols "On"
        runtime "Debug"
        staticruntime "on"

    filter { "configurations:release", "system:windows" }
        staticruntime "on"
        runtime "Release"
        optimize "On"
